//练习3：实现以个函数ex3，使用safeProp和fp.first找到user的名字的首字母
const fp = require('lodash/fp')
const { Maybe, Container } = require('./support')
let safeProp = fp.curry(function (x, o) {
   return Maybe.of(o[x])
})
const log = v => {
  console.log(v)
  return v
}
let user = { id: 2, name: 'Albert' }
let ex3 = () => {
   return fp.first(safeProp('name',user)._value)
}

console.log(ex3())